import { ref } from 'vue'
import { type User } from '@/types/index'
export default function useState() {
    const stateval = ref()
    const changestates = (row: User) => {
        if (row.state == '1') {
            row.state = '2'
            stateval.value = 2
        } else {
            stateval.value = 1
            row.state = '1'
        }
    }
    return { stateval, changestates }
}